<?=$this->Style()->IncludeStyleFile(array('js' => 'ckfinder'), false, false, false);?>
<script type="text/javascript">
	function SetFileField_<?=$this->fieldId;?>( fileUrl )
	{
	  $('#filef_<?=$this->fieldId;?>').val(fileUrl);
	}
	
	$(document).ready(
	  function()
	  {
			$("#button_<?=$this->fieldId;?>").click(
					function(e)
					{
						var finder = new CKFinder();
						finder.basePath = '<?=_FILEMANAGER_URL;?>';
						finder.selectActionFunction = SetFileField_<?=$this->fieldId;?>;
						finder.popup();
					}
			);
	  }
	)
</script>
<input type="text" class="input inp_serverfile" name="<?=$this->fieldName;?>[file]" id="filef_<?=$this->fieldId;?>" value="<?=htmlspecialchars($this->data['file']);?>" readonly>
<input type="button" id="button_<?=$this->fieldId;?>" value="<?php echo Mozg_Lang::_('CHOOSE'); ?>" class="bt" />